<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>Halaman Admnistrator Culture-vid</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
	<link href="<?php echo base_url()?>asset/css/bootstrap.css" rel="stylesheet">
	<link href="<?php echo base_url()?>asset/css/bootstrap-responsive.css" rel="stylesheet">
	<link href="<?php echo base_url()?>asset/css/style.css" rel="stylesheet">
    <link rel="shortcut icon" href="/favicon.ico">
	
</head>
<body>  

	<div class="container-fluid" style="">  
		    <div class="row-fluid">  
				<div class="col-lg-12" id="header">  
					<a href="<?php echo base_url()?>index.php"><img src="<?php echo base_url()?>asset/img/logo.png" style="width: 300px; height: 120px; align:center; display: inline; margin: 0px 0 50px 20px"/></img></a>
					<h3 style="margin: -79px 0 20px 90px; font-family: Georgia; font-size: 30px"></h3> <br>
					<small style="font-family: Times New Roman; font-size: 17px; margin: -40px 0 0 90px; display: inline; position: absolute"></small>
					<span style="margin-top: -15px; margin-right:10px; font-family: tahoma; font-size:18px;" class="pull-right span3">
					
					<?php
					
						if(!$this->session->userdata('isLogin')) { ?>
					<button class="btn btn-primary" data-toggle="modal" data-target="#modal_login">Login</button>
				| <a href="<?php echo base_url()?>index.php/akun/daftar" class="btn btn-success" role="button">Daftar</a>
					<?php } else { ?> <a href="<?php echo base_url()?>index.php/" class="btn btn-success" role="button"><span class="glyphicon glyphicon-home"></span> Home</a> | <a href="<?php echo base_url()?>index.php/akun/keluar_akun" class="btn btn-danger" role="button"><span class="glyphicon glyphicon-log-out"></span> Keluar</a> <?php } ?>
					</span>
					
				</div>  
			</div> <?php $user = $this->session->userdata('username'); ?>
		<div class="row-fluid" >
			<div class="col-lg-12" id="navbar" >
			<!--span class="pull-left" style="margin-left:5px; color:#ffffff;"> <h3><!?php echo $user; ?> : Administrator</h3> </span-->
				<form class="navbar-form navbar-right" style="margin-top:10px; margin-right:0px; margin-left:1px;" role="search" action="<?php echo base_url()?>index.php/video/cari_video" method="post">
				
					  <div class="form-group ">
						<input type="text" class="form-control" placeholder="cari video disini..." name="cari">
					  </div>
					  <button type="submit" class="btn btn-danger " ><span class="glyphicon glyphicon-search "></span></button>
				</form>
				
				
			</div>  
		</div>
		
	<div class="container-fluid">  
		<div class="row-fluid">  
		<div class="col-lg-2 " style="" id="left-content">  
		 <div class="row-fluid">  
			<?php $user = $this->session->userdata('username'); ?>
			<?php $peran = $this->session->userdata('peran'); ?>
			<?php if($user != NULL):?>
		   <div class="col-lg-12" id="sidebar-widget">
				<ul class="nav nav-list">
				  <li class="nav-header" style=""><strong><?php if($peran == 0 ) { echo $user; ?> : Administrator <?php } else if($peran == 1){ echo $user?> : Administrator Reviewer <?php } else { echo $user; ?> : Reviewer <?php } ?></strong></li>
					<li><a href="<?php echo base_url()?>index.php/admin" class="glyphicon glyphicon-user">  Profilku </a></li>  
					<?php if($peran == 0 || $peran == 1){?><li><a href="<?php echo base_url()?>index.php/admin/list_akun" class="glyphicon glyphicon-wrench">  Master Akun </a></li> <?php } ?> 
					<?php if($peran == 0 || $peran == 2){?><li><a href="<?php echo base_url()?>index.php/video/data_video" class="glyphicon glyphicon-wrench"><!--span class="badge pull-right"></span-->  Master Video </a></li> <?php } ?>
					<?php if($peran == 0){?><li><a href="<?php echo base_url()?>index.php/komentar/data" class="glyphicon glyphicon-wrench"><!--span class="badge pull-right"></span-->  Master Komentar </a></li> <?php } ?>
					</ul>
				<span class="col-lg-1"/>
			</div> <?php endif;?>
		
		
		  
		 </div>   
		</div>  
	   
			   	   
		<div class="col-lg-10" style="" id="right-content">  
		 <div class="main-content row-fluid">
		 
		 
		
		<!-- konten video -->
		  <div class="col-lg-12 " style="margin-left:0px">   
		   <legend style="margin-top:40px"><h3>Selamat Datang Admin <small>Dashboard Admin</small></h3></legend>  
		   
		   <div class="col-lg-5">
			<form class="form-horizontal pull-center" role="form">
				<?php if($peran == 0) { ?>	
				  <div class="form-group bg-success">
					<label class="col-sm-6 control-label">Akun Belum Aktif :</label>
					<div class="col-sm-6">
					  <label class="control-label"><a href="<?php echo base_url()?>index.php/admin/list_akun"><?php echo $tidakaktif;?></a></label>
					</div>
					</div>
					
					<div class="form-group bg-info">
					<label class="col-sm-6 control-label">Komentar Baru :</label>
					<div class="col-sm-6">
					  <label class="control-label"><a href="<?php echo base_url()?>index.php/komentar/update_status"><?php echo $komentar_baru;?></a></label>
					</div>
				  </div>
				<?php } ?>
				<?php  if($peran == 1) {?>
				  <div class="form-group bg-danger">
					<label class="col-sm-6 control-label">Reviewer Belum Valid :</label>
					<div class="col-sm-5">
					  <label class="control-label"><a href="<?php echo base_url()?>index.php/admin/list_akun"><?php echo count($reviewer_baru);?></a></label>
					</div>
				  </div>
				<?php } ?>
				<?php  if($peran == 2 || $peran == 0) {?>
				  <div class="form-group bg-danger">
					<label class="col-sm-6 control-label">Video Baru :</label>
					<div class="col-sm-5">
					  <label class="control-label"><a href="<?php echo base_url()?>index.php/video/data_video"><?php echo $video_baru;?></a></label>
					</div>
				  </div>
				<?php } ?>	
				</form>
			</div>
			<div class="col-lg-1"></div>
			<div class="col-lg-5">
			<form class="form-horizontal pull-center" role="form">
			<?php if($peran == 0) { ?>	
				  <div class="form-group bg-success">
					<label class="col-sm-5 control-label">Banyak Akun :</label>
					<div class="col-sm-6">
					  <label class="control-label"><a href="<?php echo base_url()?>index.php/admin/list_akun"><?php echo $nakun;?></a></label>
					</div>
				</div>
				
				<div class="form-group bg-info">
					<label class="col-sm-5 control-label">Banyak Komentar :</label>
					<div class="col-sm-6">
					  <label class="control-label"><a href="<?php echo base_url()?>index.php/komentar/data"><?php echo $nkomentar;?></a></label>
					</div>
				  </div>
			<?php } ?>
			
			<?php  if($peran == 1) {?>
				  <div class="form-group bg-danger">
					<label class="col-sm-4 control-label">Reviewer Valid :</label>
					<div class="col-sm-6">
					  <label class="control-label"><a href="<?php echo base_url()?>index.php/admin/list_akun"><?php echo count($nreviewer);?></a></label>
					</div>
				  </div>
				<?php } ?>
			<?php  if($peran == 2 || $peran == 0) {?>
				  <div class="form-group bg-danger">
					<label class="col-sm-5 control-label">Banyak Video :</label>
					<div class="col-sm-6">
					  <label class="control-label"><a href="<?php echo base_url()?>index.php/video/data_video"><?php echo $nvideo;?></a></label>
					</div>
				  </div>
			<?php } ?>	
				 
				  
				</form>
			</div>
	  
		  </div>  
		  <!-- end -->
		 </div>
		</div>  
	   </div>  
	  
	  
	   <!--S : Footer-->  
	  
	   <div class="row-fluid">  
		<div class="col-lg-12" id="footer"> <p class = "footer-text"> Copyright 2014 </p> 
		</div>  
	   </div>  
	  
	   <!--E : Footer-->  
	  
	  </div>
	</div>
							
	
	<div class="modal fade" style="" id="edit_data" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			  <div class="modal-dialog" >
				<div class="modal-content">
				  <div class="modal-header" style="background-color:#E34D55;">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel" style="color:#ffffff;">Ubah Akun</h4>
				  </div>
				  <div class="modal-body" >
				  <div id="registerModalerror"></div>
					<form class="form-horizontal" role="form" action="<?php echo base_url()?>index.php/akun/ubah_profil" method="post">
					  <div class="form-group">
						<label for="inputakun" class="col-md-4 control-label">Nama Akun</label>
						<div class="col-sm-8">
						  <input type="text" name="namaakun" class="form-control" id="namaakun" value="<?php echo $akun->username;?>" required>
						</div>
					  </div>
					  
					  <div class="form-group">
						<label for="inputnama" class="col-md-4 control-label">Nama Lengkap</label>
						<div class="col-sm-8">
						  <input type="text" name="namalengkap" class="form-control" id="namalengkap" value="<?php echo $akun->nama_lengkap;?>" required>
						</div>
					  </div>
					  
					  <div class="form-group">
					  <label for="jk" class="col-md-4 control-label">Jenis Kelamin</label>
							<div class="col-sm-8">
							  <div class="radio">
								  <label>
									<input type="radio" name="jk" id="lakilaki" value="1" checked>
									Laki - laki
								  </label>
								</div>
								<div class="radio">
								  <label>
									<input type="radio" name="jk" id="perempuan" value="2">
									Perempuan
								  </label>
							</div>
							</div>
					  </div>
					  
					  <div class="form-group">
						<label for="tanggallahir" class="col-md-4 control-label">Tanggal Lahir</label>
						<div class="col-sm-8">
						  <input type="date" id="datepicker" class="form-control" name="tanggallahir" value="<?php echo $akun->tgl_lahir;?>">
						</div>
					  </div>
					  
					  <div class="form-group">
						<label for="email" class="col-md-4 control-label">Alamat Email</label>
						<div class="col-sm-8">
						  <input type="email" id="email" class="form-control" name="email" value="<?php echo $akun->email;?>" required>
						</div>
					  </div>
				
					  
					  <div class="form-group">
						<label for="pendidikan" class="col-md-4 control-label">Pendidikan</label>
					  <div class="btn-group col-sm-5">
						  <select class="form-control" name="pendidikan">
							<option value="SMP">SMP</option>
							<option value="SMA">SMA</option>
							<option value="S1">S1</option>
							<option value="S2">S2</option>
							<option value="S3">S3</option>
						  </select>
						</div>
					  </div>
					  
					  <div class="form-group">
						<label for="pekerjaan" class="col-md-4 control-label">Pekerjaan</label>
					  <div class="btn-group col-sm-5">
						  <select class="form-control" name="pekerjaan">
							<option value="Guru">Guru</option>
							<option value="Wiraswasta">Wiraswasta</option>
							<option value="Pelajar">Pelajar</option>
							<option value="PNS">PNS</option>
							<option value="Dosen">Dosen</option>
						  </select>
						</div>
					  </div>
					  
					  <div class="form-group">
						<label for="bidangstudi" class="col-md-4 control-label">Bidang Studi</label>
					  <div class="btn-group col-sm-5">
						  <select class="form-control" name="bidang_studi">
							<option value="Ilmu Hukum">Ilmu Hukum</option>
							<option value="Sospol">Sospol</option>
							<option value="MIPA">MIPA</option>
							<option value="Teknik Mesin">Teknik Mesin</option>
							<option value="Teknik Elektro">Teknik Elektro</option>
						  </select>
						</div>
					  </div>
					  
					  
					  <div class="form-group">
						<div class="col-sm-offset-2 col-sm-10">
						  <button type="submit" class="btn btn-success">Simpan</button>
						  <button type="button" class="btn btn-default" data-dismiss="modal">Batal</button>
						</div>
					  </div>
					</form>
				  </div>
				</div><!-- /.modal-content -->
			  </div><!-- /.modal-dialog -->
			</div><!-- /.modal -->
		
			<!-- modal end daftar akun-->
			
		
			<!-- modal end daftar akun-->
		
	
	
    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
	
    <script src="<?php echo base_url()?>asset/js/jquery.js"></script>
    <script src="<?php echo base_url()?>asset/js/bootstrap.js"></script>
    
</body>
</html>